#2.3
import random

WORDS = ("python", "jumble", "easy", "difficult", "answer", "continue"
         , "phone", "position", "game")

print("Welcome Word-Guess Game!")
while(True):
    word = random.choice(WORDS)
    ws = set(word)
    print("乱序后字母集合：{}".format(ws))
    while(True):
        yw = input("你的单词:")
        if yw == word:
            print("Great!!!")
        else:
            print("Sorry~~~")
            continue
        temp = input("是否继续Y/N")
        if temp == 'y' or temp == 'Y':
            break
        else:
            exit(0)
  